package com.example.orderconsumer.service;

import com.example.orderconsumer.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Service
@FeignClient(
        value = "product-service",
        fallbackFactory = com.example.orderconsumer.config.ProductServiceFallbackFactory.class
)
public interface ProductService {
    @RequestMapping("/product/findbyid/{id}")
    Product findById(@PathVariable Long id);

}